import request from '@/utils/request'

/**
* 区域分页查询
* @param {查询条件} data
*/
export function listSetArea(query) {
  return request({
    url: '/set/area/list',
    method: 'get',
    params: query,
  })
}

/**
* 区域分页查询
* @param {查询条件} data
*/
export function listAllSetArea(query) {
  return request({
    url: '/set/area/interface',
    method: 'get',
    params: query,
  })
}



/**
* 新增区域
* @param data
*/
export function addSetArea(data) {
  return request({
    url: '/set/area',
    method: 'post',
    data: data,
  })
}

/**
* 修改区域
* @param data
*/
export function updateSetArea(data) {
  return request({
    url: '/set/area',
    method: 'PUT',
    data: data,
  })
}

/**
* 获取区域详情
* @param {Id}
*/
export function getSetArea(id) {
  return request({
    url: '/set/area/' + id,
    method: 'get'
  })
}

/**
* 删除区域
* @param {主键} pid
*/
export function delSetArea(pid) {
  return request({
    url: '/set/area/' + pid,
    method: 'delete'
  })
}

// 导出区域
export function exportSetArea(query) {
  return request({
    url: '/set/area/export',
    method: 'get',
    params: query
  })
}
// 下载模板
export function importTemplate() {
  return request({
    url: '/set/area/importTemplate',
    method: 'get',
  })
}

